import { configureStore } from '@reduxjs/toolkit';
import authSlice from './slices/authSlice';
import opportunitySlice from './slices/opportunitySlice';
import dashboardSlice from './slices/dashboardSlice';
import businessPlanSlice from './slices/businessPlanSlice';
import riskSlice from './slices/riskSlice';
import analyticsSlice from './slices/analyticsSlice';

export const store = configureStore({
  reducer: {
    auth: authSlice,
    opportunity: opportunitySlice,
    dashboard: dashboardSlice,
    businessPlan: businessPlanSlice,
    risk: riskSlice,
    analytics: analyticsSlice,
  },
});

export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
